package com.ruoyi.customerSample.service.impl;


import com.ruoyi.customerSample.domain.InspectedUnitParams;
import com.ruoyi.customerSample.mapper.InspectedUnitParamsMapper;
import com.ruoyi.customerSample.service.IInspectedUnitParamsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 受检设备铭牌参数Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-09-06
 */
@Service
public class InspectedUnitParamsServiceImpl implements IInspectedUnitParamsService
{
    @Autowired(required = false)
    private InspectedUnitParamsMapper inspectedUnitParamsMapper;

    /**
     * 查询受检设备铭牌参数
     * 
     * @param id 受检设备铭牌参数ID
     * @return 受检设备铭牌参数
     */
    @Override
    public InspectedUnitParams selectInspectedUnitParamsById(String id)
    {
        return inspectedUnitParamsMapper.selectInspectedUnitParamsById(id);
    }

    /**
     * 根据受检设备id获取铭牌信息
     * @param equId 受检设备id
     * @return
     */
    @Override
    public List<InspectedUnitParams> selectInspectedUnitParamsByEquId(String equId) {
        return inspectedUnitParamsMapper.selectInspectedUnitParamsByEquId(equId);
    }

    /**
     * 查询受检设备铭牌参数列表
     * 
     * @param inspectedUnitParams 受检设备铭牌参数
     * @return 受检设备铭牌参数
     */
    @Override
    public List<InspectedUnitParams> selectInspectedUnitParamsList(InspectedUnitParams inspectedUnitParams)
    {
        return inspectedUnitParamsMapper.selectInspectedUnitParamsList(inspectedUnitParams);
    }

    /**
     * 新增受检设备铭牌参数
     * 
     * @param inspectedUnitParams 受检设备铭牌参数
     * @return 结果
     */
    @Override
    public int insertInspectedUnitParams(InspectedUnitParams inspectedUnitParams)
    {
        return inspectedUnitParamsMapper.insertInspectedUnitParams(inspectedUnitParams);
    }

    /**
     * 批量新增受检设备信息
     * @param inspectedUnitParams 受检设备铭牌参数
     * @return
     */
    @Override
    public int insertInspectedUnits(List<InspectedUnitParams> inspectedUnitParams) {
        return inspectedUnitParamsMapper.insertInspectedUnits(inspectedUnitParams);
    }

    /**
     * 修改受检设备铭牌参数
     * 
     * @param inspectedUnitParams 受检设备铭牌参数
     * @return 结果
     */
    @Override
    public int updateInspectedUnitParams(InspectedUnitParams inspectedUnitParams)
    {
        return inspectedUnitParamsMapper.updateInspectedUnitParams(inspectedUnitParams);
    }

    /**
     * 批量删除受检设备铭牌参数
     * 
     * @param ids 需要删除的受检设备铭牌参数ID
     * @return 结果
     */
    @Override
    public int deleteInspectedUnitParamsByIds(String[] ids)
    {
        return inspectedUnitParamsMapper.deleteInspectedUnitParamsByIds(ids);
    }

    /**
     * 根据设备id和委托单位id删除铭牌参数
     * @param equId 设备Id ownershipId 委托单位Id
     * @param ownershipid
     * @return
     */
    @Override
    public int deleteInspectedUnitParamsByEquId(String equId, String ownershipid) {
        return inspectedUnitParamsMapper.deleteInspectedUnitParamsByEquId(equId, ownershipid);
    }

    /**
     * 删除受检设备铭牌参数信息
     * 
     * @param id 受检设备铭牌参数ID
     * @return 结果
     */
    @Override
    public int deleteInspectedUnitParamsById(String id)
    {
        return inspectedUnitParamsMapper.deleteInspectedUnitParamsById(id);
    }
}
